<?php

/**
 * AppRouter static class
 * provides global changes of RaisePostback in application without being directly
 * affected by framework upgrades and changes. All application postback controllers should
 * inherit from AppPostback instead of RaisePostback
 *
 * @author Sam-Mauris Yong <hellclanner at live dot com>
 * @license http://www.opensource.org/licenses/bsd-license New BSD License
 * @package Raise.App
 * @since 1.2
 */
class AppRouter extends RaiseStaticClass implements IRaiseInitializable {

    public static function initialize() {
        self::add('home', new RaiseUrlRoute('', 'Index'));
    }

    /**
     * Add a new routing entry
     * @param string $key
     * @param RaiseUrlRoute $route
     */
    private static function add($key, $route){
        RaiseUrlRoute::routes()->add($key, $route);
    }

}
